package com.foreverwin.mes.production.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.foreverwin.mes.core.base.FrontPage;
import com.foreverwin.mes.core.exception.BusinessException;
import com.foreverwin.mes.production.model.WorkDayRestTime;

import java.util.List;

public interface WorkDayRestTimeService extends IService<WorkDayRestTime> {

    /**
     * 分页查询
     *
     * @param frontPage
     * @return
     */
    Page<WorkDayRestTime> selectPage(FrontPage<WorkDayRestTime> frontPage);

    List<WorkDayRestTime> selectList();

    WorkDayRestTime getWorkDayRestTimeData(String site, String workCenter);


    /**
     * 保存工作日休息数据
     *
     * @param site
     * @param userId
     * @param workCenter
     * @param startTime
     * @param endTime
     * @param modifiedDateTime
     * @throws BusinessException
     */
    void saveWorkDayRestData(String site, String userId, String workCenter, String startTime,
                             String endTime, String modifiedDateTime) throws BusinessException;

    /**
     * 更新工作日休息数据
     *
     * @param site
     * @param userId
     * @param workCenter
     * @param startTime
     * @param endTime
     * @param modifiedDateTime
     * @throws BusinessException
     */
    void updateWorkDayRestData(String site, String userId, String workCenter, String detailHandle, String startTime,
                               String endTime, String modifiedDateTime) throws BusinessException;

    /**
     * 删除工作日休息数据
     *
     * @param site
     * @param user
     * @param workCenter
     * @param modifiedDateTime
     * @param detailHandleList
     * @throws BusinessException
     */
    void deleteWorkDayRestData(String site, String user, String workCenter, String modifiedDateTime,
                               List<String> detailHandleList) throws BusinessException;
}